home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 334 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  45 lines

  1. Path: chaos.kulnet.kuleuven.ac.be!verhaege
  2. From: verhaege@esat.kuleuven.ac.be (Wim Verhaegen)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C to C++
  5. Date: 3 Jan 1996 21:50:21 GMT
  6. Organization: K.U.Leuven
  7. Message-ID: <4cetmt$9an@chaos.kulnet.kuleuven.ac.be>
  8. References: <30EA2EA0.86C@comcept.ab.ca>
  9. NNTP-Posting-Host: deugniet.esat.kuleuven.ac.be
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. The BFP (bfp@comcept.ab.ca) wrote:
  13. > Hey,
  14.  
  15. > I am new at this stuff, and I am trying to learn C++.  I have looked at C 
  16. > source code, and incredibly Simple programs like
  17.  
  18. > <#include stdio.h>
  19.  
  20. > printf("Hi")
  21.  
  22. > Will not compile for C++.  I am lame, yes, I kn ow but, hey, Nobody is 
  23. > perfect, anyways, could somebody help me :)
  24.  
  25. > Please :)
  26.  
  27. Don't try making your programs too simple (and learn the proper syntax)
  28. The following should work:
  29.  
  30. // BEGIN
  31. #include <stdio.h>
  32.  
  33. int main()
  34. {
  35.     printf("Hi\n");
  36.     return 0; // not necessary, but convenient
  37. }
  38. // END
  39.  
  40. --
  41. Wim Verhaegen                       |  All theory is grey, my friend,
  42. Dept. of Electrical Engineering     |  And green the golden tree of life.
  43. KU Leuven, Belgium                  |
  44. verhaege@esat.kuleuven.ac.be        |                              Goethe
  45.